﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Frame.Lib.Core.Base;

namespace Jzy.Workflow.Flow
{
    public class ControlRightBO : CommonOperate<ControlRightInfo>
    {
        private ControlRightDAL _controlRight;

        protected override BaseDAL DAL
        {
            get
            {
                return _controlRight;
            }
        }

        public ControlRightBO()
        {
            _controlRight = new ControlRightDAL();
        }

        public void Delete(string controlName, int nodeID, int rightID)
        {
            _controlRight.Delete(controlName,nodeID, rightID);
        }

        public List<ControlRightInfo> GetList(int flowID, string controlName)
        {
            List<ControlRightInfo> list = _controlRight.GetList(flowID, controlName);
            return list;
        }

        public List<string> GetControls(int nodeID,int userID, RightName rightName)
        {
            List<string> ctls = _controlRight.GetControls(nodeID, userID, rightName);
            return ctls;
        }
    }
}
